<!DOCTYPE html>
        <head>
		<meta charset="utf-8">
		<title>健身中心</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<!--标准mui.css-->
		<link rel="stylesheet" href="../css/mui.min.css">
		<style>
			h5 {
				margin: 5px 7px;
			}
			.q1{
				width: 100%;
				margin-top: 20px;
				margin-left: 16px;
				margin-bottom: 5px;
			}
			.q2{
				width: 100%;
				height: 50px;
				text-align: center;
				font-size: 30px;
				line-height: 50px;
			}
			.mui-input-clear1{
				/* margin-left: 118px; */
			}
		</style>
	</head>
        <body>
        	<div class="mui-content">
        		<div class="q2">健身中心入会申请表</div>
        	<div class="mui-content-padded" style="margin: 5px;">
        	<form class="mui-input-group" style="margin-top: 10px;">
					<div class="mui-input-row" >
						<label>姓名:</label>
						<input id="xingming" type="text" class="mui-input-clear"  maxlength="10" placeholder="请输入姓名">
					</div>
					<div class="mui-input-row">
						<label>性别:</label>
						<input id="xingbie" type="text" class="mui-input-clear"  maxlength="1" placeholder="请输入性别 “男”或“女”">
					</div>
					<div class="mui-input-row">
						<label>身份证/护照:</label>
						<input id="shenfenzheng" type="text" class="mui-input-clear"  maxlength="30" placeholder="请输入身份证/护照号码">
					</div>
					<div class="mui-input-row">
						<label>工作证号:</label>
						<input id="gongzuozheng" type="text" class="mui-input-clear"  maxlength="30" placeholder="请输入工作证号">
					</div>
					<div class="mui-input-row">
						<label>国籍:</label>
						<input id="guoji" type="text" class="mui-input-clear"  maxlength="20" placeholder="请输入国籍">
					</div>
					<div class="mui-input-row">
						<label>生日:</label>
						<input id="shengri" type="text" class="mui-input-clear"  maxlength="10" placeholder="请输入出生日期">
					</div>
					<div class="mui-input-row">
						<label>QQ/微信:</label>
						<input id="qq" type="text" class="mui-input-clear"  maxlength="20" placeholder="请输入QQ/微信号码">
					</div>
					<div class="mui-input-row">
						<label>邮箱:</label>
						<input id="email" type="text" class="mui-input-clear"  maxlength="20" placeholder="邮箱">
					</div>
					
				</form>
				<form class="mui-input-group" style="margin-top: 10px;">
					
					<div class="mui-input-row" style="height: 90px;">
						<div class="q1">居住地址:</div>
						<input  id="jvzhudizhi" type="text" class="mui-input-clear1"  maxlength="30" placeholder="请输入居住地址">
					</div>
					<div class="mui-input-row" style="height: 90px;">
						<div class="q1">本人联系电话:</div>
						<input id="lianxidianhua" type="text" class="mui-input-clear1"  maxlength="30" placeholder="请输入本人联系电话">
					</div>
					<div class="mui-input-row" style="height: 90px;">
						<div class="q1">单位所属部门:</div>
						<input id="danweisuoshu" type="text" class="mui-input-clear1"  maxlength="30" placeholder="请输入单位所属部门">
					</div>
					<div class="mui-input-row" style="height: 130px;">
						<div class="q1">紧急情况下联系电话:</div>
						<input id="lianxi1" type="text" class="mui-input-clear1" maxlength="30" placeholder="请输入紧急联系电话1">
						<input id="lianxi2" type="text" class="mui-input-clear1" maxlength="30" placeholder="请输入紧急联系电话2">
					</div>
				</form>
				<form class="mui-input-group" style="margin-top: 5px;">
				<div class="mui-button-row">
						<button type="button" class="mui-btn mui-btn-primary" onclick="note1()">下一页</button>&nbsp;&nbsp;
					</div>
				</form>
			</div>
		</div>
		<script src="../script/mui.min.js"></script>
		<script src="../script/jquery.min.js"></script>
		 <script src="../script/utils.js"></script>
		  <script src="../script/JsUrl.js"></script>
        </body>
        <script>
        	window.onload=function(){ 
                

        		var email=utils.getParam("email");
        		
        		 $.ajax({
					        url: URL_1+"selectByPersonEmail",
					        type: 'GET',
					        dataType: 'json',
					        cache: false,
					        data: {
					            email: email
					        },
					        
					        error: erryFunction, //错误执行方法
					        success: succFunction //成功执行方法
					    })

					    function erryFunction() {
					        alert("失败1");
					    }

					    function succFunction(JsonString) {
					    	 json = eval(JsonString);
					    	 var orderJson = json.extend.success;
					    	 if (orderJson.length != 0) {
                				for (var i = 0; i < orderJson.length; i++) {
                					if(orderJson[i]["userbirthday"]!="") document.getElementById("shengri").value=orderJson[i]["userbirthday"];
                					if(orderJson[i]["email"]!="") document.getElementById("email").value=orderJson[i]["email"];
                					if(orderJson[i]["usertruename"]!="") document.getElementById("xingming").value=orderJson[i]["usertruename"];
                					 if(orderJson[i]["usersex"]!="") {
                					 	if(orderJson[i]["usersex"]=="0"){document.getElementById("xingbie").value="女";}else{document.getElementById("xingbie").value="男";}
                					 }
                					if(orderJson[i]["idnumber"]!="") document.getElementById("shenfenzheng").value=orderJson[i]["idnumber"];
                					if(orderJson[i]["organizeallname"]!="") document.getElementById("danweisuoshu").value=orderJson[i]["organizeallname"];
                					if(orderJson[i]["useraddress"]!="") document.getElementById("jvzhudizhi").value=orderJson[i]["useraddress"];
                					if(orderJson[i]["mobilephone"]!="") document.getElementById("lianxidianhua").value=orderJson[i]["mobilephone"];

								}
							}
			        	}
}

        	function note1(){
        		var xingming =document.getElementById("xingming").value;
        		var xingbie =document.getElementById("xingbie").value;
        		var shenfenzheng =document.getElementById("shenfenzheng").value;
        		var gongzuozheng =document.getElementById("gongzuozheng").value;
        		var guoji =document.getElementById("guoji").value;
        		var shengri =document.getElementById("shengri").value;
        		var qq =document.getElementById("qq").value;
        		var email =document.getElementById("email").value;

        		
        		var jvzhudizhi =document.getElementById("jvzhudizhi").value;
        		var lianxidianhua =document.getElementById("lianxidianhua").value;
        		var danweisuoshu =document.getElementById("danweisuoshu").value;
        		var lianxi1 =document.getElementById("lianxi1").value;
        		var lianxi2 =document.getElementById("lianxi2").value;
        		// alert(xingming+xingbie+shenfenzheng+guoji);
        		// alert(shengri+qq+jvzhudizhi);
        		// alert(lianxidianhua+danweisuoshu+lianxi1+lianxi2);


				if(xingming==""||xingbie==""||shenfenzheng==""||guoji==""||shengri==""||qq==""||jvzhudizhi==""||lianxidianhua==""||danweisuoshu==""||lianxi1==""||lianxi2==""||gongzuozheng==""||email==""){
					mui.alert('存在未填写的选项，请填写所有信息', '提醒');
				}else{

					if(document.getElementById("xingbie").value!="男"&&document.getElementById("xingbie").value!="女"){
						mui.alert('性别请输入男或女！', '提醒');
					}else{
						window.open("note2.html?xingming="+xingming+"&xingbie="+xingbie+"&shenfenzheng="+shenfenzheng+"&xingbie="+xingbie+"&guoji="+guoji+"&qq="+qq+"&jvzhudizhi="+jvzhudizhi+"&lianxidianhua="+lianxidianhua+"&danweisuoshu="+danweisuoshu+"&lianxi1="+lianxi1+"&lianxi2="+lianxi2+"&shengri="+shengri+"&gongzuozheng="+gongzuozheng+"&email="+email);
					}

				}

        		
        	}
        </script>
    </html>